package rewardsonline.accounts;

/**
 * Allow setting the entity Id of Accounts or Beneficiaries. Provides a way to
 * set entity ids without providing a public <code>setEntityId()</code> method
 * on the DTO classes themselves.
 */
public class DtoHelper {

	/**
	 * Set the entity Id of the Account DTO.
	 * 
	 * @param account
	 *            The account DTO instance.
	 * @param entityId
	 *            It's entity id (unique key).
	 */
	public void setEntityId(Account account, int entityId) {
		account.entityId = entityId;
	}

	/**
	 * Set the entity Id of the Beneficiary DTO.
	 * 
	 * @param account
	 *            The beneficiary DTO instance.
	 * @param entityId
	 *            It's entity id (unique key).
	 */
	public void setEntityId(Beneficiary beneficiary, int entityId) {
		beneficiary.entityId = entityId;
	}

}
